package org.dreamfly.netshop.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ShipType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "Shiptype")
public class ShipType implements java.io.Serializable {

    // Fields
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @ManyToOne(targetEntity = Type.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "ClassID")
    private Type type;
    @Column(name = "shipway")
    private String shipWay;
    @Column(name = "shipfee")
    private Double shipFee;

    // Constructors

    /** default constructor */
    public ShipType() {
    }

    /** minimal constructor */
    public ShipType(Type type) {
        this.type = type;
    }

    /** full constructor */
    public ShipType(Type type, String shipWay, Double shipFee) {
        this.type = type;
        this.shipWay = shipWay;
        this.shipFee = shipFee;
    }

    // Property accessors

    public Long getShipId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Type getType() {
        return this.type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public String getShipWay() {
        return this.shipWay;
    }

    public void setShipWay(String shipWay) {
        this.shipWay = shipWay;
    }

    public Double getShipFee() {
        return this.shipFee;
    }

    public void setShipFee(Double shipFee) {
        this.shipFee = shipFee;
    }

}